package com.demo.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
//表示将该类标识为Bean
@Component
//用于绑定属性，其中prefix表示所绑定的属性的前缀。
@ConfigurationProperties(prefix = "person")
//表示配置文件路径。PropertySource默认取application.properties
//@PropertySource(value = "application.properties")
//@Validated
public class Person {

    private String lastName;
    private  String isEmail;
    private Integer age;
    private Map<String, Object> maps;
    private Dog dog;

    @Override
    public String toString() {
        return "Person{" +
            "lastName='" + lastName + '\'' +
            ", age=" + age +
            ", maps=" + maps +
            ", dog=" + dog +
            '}';
    }

    public List<Object> getLists() {
        return lists;
    }

    public void setLists(List<Object> lists) {
        this.lists = lists;
    }

    private List<Object> lists;

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }


    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Map<String, Object> getMaps() {
        return maps;
    }

    public void setMaps(Map<String, Object> maps) {
        this.maps = maps;
    }

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }


}
